import os

from dotenv import load_dotenv
from sqlalchemy.orm import Session
from sqlalchemy import select
from fastapi import HTTPException
from ..models.videos_model import Videos

def get_video_quantity(db: Session) -> int:
    """
    获取视频数量
    """
    result = db.execute(select(Videos)).scalars().all()
    return len(result)